package com.iona.servlets;

import java.io.IOException;
import java.util.List;

import javax.servlet.Servlet;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.iona.dao.EstimationMeansDAO;
import com.iona.domain.EstimationMeans;
import com.iona.json.JSONException;
import com.iona.json.builders.EstimationMeansBuilder;

/**
 * Servlet implementation class EstimationMeansFeederServlet
 */
@WebServlet("/EstimationMeansFeederServlet")
public class EstimationMeansFeederServlet extends FeederServlet implements Servlet {
	private static final long serialVersionUID = 1L;


	@Override
	public Object doFeed(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException,
			JSONException {
		List<EstimationMeans> findAll = new EstimationMeansDAO().findAll();
		return new EstimationMeansBuilder(findAll).build();
	}

}
